package  {
	import mz.behaveas.model.ducktype.Duck;
	
/**
 * @author maxim.zaks@gmail.com
 */
public const SpecTest : Object = 
	{
		description : "Specification example",
        expectations:[
        
                {
                        description:"Example of not implemented expectation"
                        
                },
                {
                        description:"Example of ignored expectation",
                        ignore:"Ignored because of example",
                        behaviour:function():int{
                                var xml : XML;
                                return xml.length();
                        },
                        shouldThrow:TypeError
                },
                {
                        description:"Expect null pointer exception",
                        behaviour:function():int{
                                var xml : XML;
                                return xml.length();
                        },
                        shouldThrow:TypeError
                },
                {
                        description:"Expect null",
                        behaviour:function():Object{
                                return null;
                        },
                        shouldEqual:null
                },
                {
                        description:"Expect not null",
                        behaviour:function():Object{
                                return new XML();
                        },
                        shouldNotEqual:null
                },
                {
                        description:"Expect null pointer exception and check it with Duck",
                        behaviour:function():int{
                                var xml : XML;
                                return xml.length();
                        },
                        shouldThrow:new Duck({_type_:TypeError, errorID:1010})
                },
                {
                        description:"Check 3d Array with duck",
                        behaviour:function():*{
                                return [[1,2,3],['a','b'], null];
                        },
                        shouldEqual:new Duck({_type_:Array, length:3, 1:['a','b'], 2:null})
                }
        ]
		
	};
}
